home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
hlpkey
/
hlpkey.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
3KB
|
119 lines
VERSION 2.00
Begin Form Main
BackColor = &H00C0C0C0&
Caption = "HLPKEY F1 Hook DEMO"
ClientHeight = 2640
ClientLeft = 3030
ClientTop = 2145
ClientWidth = 4095
Height = 3045
Left = 2970
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2640
ScaleWidth = 4095
Top = 1800
Width = 4215
Begin TextBox Text1
Height = 380
Index = 3
Left = 2040
TabIndex = 3
Top = 2040
Width = 1695
End
Begin TextBox Text1
Height = 380
Index = 2
Left = 2040
TabIndex = 2
Top = 1560
Width = 1695
End
Begin TextBox Text1
Height = 380
Index = 1
Left = 2040
TabIndex = 1
Top = 1080
Width = 1695
End
Begin TextBox Text1
Height = 380
Index = 0
Left = 2040
TabIndex = 0
Top = 600
Width = 1695
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Shoe Size"
Height = 260
Index = 3
Left = 840
TabIndex = 7
Top = 2160
Width = 975
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Date of Birth"
Height = 260
Index = 2
Left = 600
TabIndex = 6
Top = 1680
Width = 1215
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Address"
Height = 260
Index = 1
Left = 840
TabIndex = 5
Top = 1200
Width = 975
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Name"
Height = 260
Index = 0
Left = 840
TabIndex = 4
Top = 720
Width = 975
End
Begin Label Label2
Caption = "Put cursor in text boxes and press F1"
Height = 260
Left = 360
TabIndex = 8
Top = 120
Width = 3255
End
End
Declare Function SetHook% Lib "hlpkey.dll" (ByVal hWnd As Integer)
Declare Sub RemoveHook Lib "hlpkey.dll" ()
Dim HelpMsg(4) As String
Sub form_Keypress (Keyascii As Integer)
MsgBox HelpMsg(Screen.ActiveControl.TabIndex), 0, "HLPKEY F1 Hook DEMO"
End Sub
Sub Form_Load ()
HelpMsg(0) = "Enter your full name"
HelpMsg(1) = "Enter your street address"
HelpMsg(2) = "Enter your date of birth"
HelpMsg(3) = "Enter shoe size"
i% = SetHook(hWnd)
End Sub
Sub Form_Unload (Cancel As Integer)
RemoveHook
End Sub